<?php
/**
	Sponsor Manager (class.errorhandler.php file)
    Copyright (C) <Sun Feb 10 03:13:42 CET 2008>  Marcos Ramírez <marcosramirez@gmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    
    Purpose: Internal Error managing, see list bellow:
    
    0.- All OK.
    1.- User doesn't exists
    2.- User allready exists
    3.- Error inserting data.
    Last Modified:

    
    
    
**/

class errorHandler {
	function __construct() {
		loadErrorTypes();
	}
	
	private function handleError($error) {
		switch ($error) {
			default:
				header("HTTP/1.1 503 Service Temporarily Unavailable");
				echo 'Undefined Error';
				die();
				break;
		}
	}
	
	function returnErrorType ($error) {
		
	}
	
	private function loadErrorTypes() {
		$ErrorTypes=array(
		'0'=>_('All OK, never used'),
		'1'=>_('User doesn\'t exists'),
		'2'=>'User allready exists'
		);
		
	}
}
?>